FROM nginx

COPY dist /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/nginx.conf
RUN mkdir -p /etc/nginx/logs
RUN tee /etc/nginx/logs/error.log
RUN tee /etc/nginx/logs/access.log
RUN chmod -R 660 /etc/nginx/logs
RUN rm /etc/nginx/conf.d/default.conf

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]